<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.4.4.min.js"></script>

</head>
<body>
	<a href="${pageContext.request.contextPath }/user/lists">主页</a>
	欢迎用户:<span>${user.realName}</span>
	<div id="all">		
		<div id="list">
			<table width="800px" border="1px">
				<tr>
					<th>编号</th>
					<th>书名</th>
					<th>图片</th>
					<th>作者</th>
					<th>出版社</th>
					<th>操作</th>
				</tr>
				<c:forEach var="list" items="${myBook}">
					<tr align="center">
						<td>${list.bid}</td>
						<td>${list.bookname }</td>
						<td>图片</td>
						<td>${list.writer}</td>
						<td>${list.press}</td>
						<td><button onclick="huanshu(${list.bid})">还书</button></td>
					</tr>
				</c:forEach>
			</table>
		</div>		
	</div>
	<script type="text/javascript">
		function huanshu(id){
			location="${pageContext.request.contextPath }/user/delbook?bid="+id;
		}
	</script>
</body>
</html>